package view;

import db.LoadAll;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.ArrayList;
import java.util.Timer;
import java.util.TimerTask;
import javax.swing.JFrame;
import model.Auction;
import model.Bid;
import model.Furniture;
import model.Jewelry;
import model.Painting;
import model.Product;
import model.User;
import model.Wine;

/**
 *
 * @author Morten
 */
public class GUISketchTwo extends javax.swing.JFrame {

    //private final LoginGUI login = new LoginGUI();
    private final LoadAll load = new LoadAll();
    private final GUISketchTwoSecond second = new GUISketchTwoSecond(load);
    private SearchResult res;
    private final Color col1;
    private final Color col2;
    private ArrayList<Auction> products;
    private MouseListener link;
    private Auction curAuction;
    private int c;
    private int cFur;
    private int cJew;
    private int cPai;
    private int cWin;
    private final int perSite;
    private int page;
    private double total;
    private int cFil;
    private int cFurFil;
    private int cJewFil;
    private int cPaiFil;
    private int cWinFil;
    private Painting pPainting;
    private Furniture pFurniture;
    private Jewelry pJewelry;
    private Wine pWine;
    private boolean startUp = false;
    private User curUser;
    private Color col3;
    private ArrayList checkBid;
    private Dimension dim;

    /**
     * Creates new form GUI
     */
    public GUISketchTwo() {
	initComponents();
	perSite = 5;
	page = 1;
	col1 = new Color(100, 60, 30);
	col2 = new Color(120, 80, 50);
	col3 = new Color(225, 30, 30);
	dim=new Dimension(380, 333);
	this.setSize(400, 520);
	jBid.setSize(dim);
//	System.out.println(this.getClass());
//	jSearchTabPanelAll.setLayout(new GridLayout(0, 1));
//	jSearchTabPanelFurniture.setLayout(new GridLayout(0, 1));
//	jSearchTabPanelJewelry.setLayout(new GridLayout(0, 1));
//	jSearchTabPanelPainting.setLayout(new GridLayout(0, 1));
//	jSearchTabPanelWine.setLayout(new GridLayout(0, 1));
	jBidcDiscription.setEditable(false);
	jSearch.setVisible(false);
	jBid.setVisible(false);
	second.setLocation(420, 0);
	second.setVisible(true);
	//login.setVisible(true);
	//login.setAlwaysOnTop(true);
    }

    private void rebuildSearchResult() {
	rebuildSearchResult("");
    }

    private void rebuildSearchResult(String search) {
	removeAllSearchResults();
	c = 0;
	cFur = 0;
	cJew = 0;
	cPai = 0;
	cWin = 0;
	cFil = 0;
	cFurFil = 0;
	cJewFil = 0;
	cPaiFil = 0;
	cWinFil = 0;
	SearchResult resFur;
	SearchResult resJew;
	SearchResult resPai;
	SearchResult resWin;
	for (final Auction a : products) {
	    final Product p = a.getProduct();
	    link = new MouseListener() {
		@Override
		public void mouseClicked(MouseEvent e) {
		    searchResultClicked();
		}

		@Override
		public void mousePressed(MouseEvent e) {
		}

		@Override
		public void mouseReleased(MouseEvent e) {
		}

		@Override
		public void mouseEntered(MouseEvent e) {
		}

		@Override
		public void mouseExited(MouseEvent e) {
		}

		private void searchResultClicked() {
		    jSearch.setVisible(false);
		    jBid.setVisible(true);
		    showBid(a);
		}
	    };
	    if (search.equals("") || p.getName().toLowerCase().contains(search)) {
		res = new SearchResult(a, load);
		res.addMouseListener(link);
		if (c % 2 == 0) {
		    res.setBackground(col1);
		} else {
		    res.setBackground(col2);
		}
		c++;
		if (p instanceof Furniture) {

		    resFur = new SearchResult(a, load);
		    resFur.addMouseListener(link);
		    cFur++;
		    if (cFur <= (perSite * page) && cFur > ((perSite * page)) - perSite) {
			jSearchTabPanelFurniture.add(resFur);
			cFurFil++;
		    }
		    if (cFur % 2 == 0) {
			resFur.setBackground(col1);
		    } else {
			resFur.setBackground(col2);
		    }
		} else if (p instanceof Jewelry) {
		    resJew = new SearchResult(a, load);
		    resJew.addMouseListener(link);
		    cJew++;
		    if (cJew <= (perSite * page) && cJew > ((perSite * page)) - perSite) {
			jSearchTabPanelJewelry.add(resJew);
			cJewFil++;
		    }
		    if (cJew % 2 == 0) {
			resJew.setBackground(col1);
		    } else {
			resJew.setBackground(col2);
		    }
		} else if (p instanceof Painting) {
		    resPai = new SearchResult(a, load);
		    resPai.addMouseListener(link);
		    cPai++;
		    if (cPai <= (perSite * page) && cPai > ((perSite * page)) - perSite) {
			jSearchTabPanelPainting.add(resPai);
			cPaiFil++;
		    }
		    if (cPai % 2 == 0) {
			resPai.setBackground(col1);
		    } else {
			resPai.setBackground(col2);
		    }
		} else if (p instanceof Wine) {
		    resWin = new SearchResult(a, load);
		    resWin.addMouseListener(link);
		    cWin++;
		    if (cWin <= (perSite * page) && cWin > ((perSite * page)) - perSite) {
			jSearchTabPanelWine.add(resWin);
			cWinFil++;
		    }
		    if (cWin % 2 == 0) {
			resWin.setBackground(col1);
		    } else {
			resWin.setBackground(col2);
		    }
		}
		if (c <= (perSite * page) && c > ((perSite * page)) - perSite) {
		    jSearchTabPanelAll.add(res);
		    cFil++;
		}
	    }
	}
	updatePagenum(c, cPai, cFur, cJew, cWin);
	filler(cFil, cPaiFil, cFurFil, cJewFil, cWinFil);
	setSearchTitles(c, cPai, cFur, cJew, cWin);
	revalidateSearchResults();
    }

    private void showBid(Auction a) {
	Product p = a.getProduct();
	curAuction = a;
	clearBiddingSite();
	jBidcTitle.setText(p.getName());
	jBidcDiscription.setText(p.getDiscription());
	jBidcValue.setText(p.getValue() + " kr.");
	if (p instanceof Painting) {
	    pPainting = (Painting) p;
	    jBidL1.setText("Kunstner:");
	    jBidL1Text.setText(pPainting.getPainter());
	    jBidL2.setText("År malet:");
	    jBidL2Text.setText(pPainting.getYear() + "");
	    jBidL5.setText("Stil:");
	    jBidL5Text.setText(pPainting.getArtstyle());
	    jBidL6.setText("Størrelse:");
	    jBidL6Text.setText(pPainting.getSize());
	} else if (p instanceof Furniture) {
	    pFurniture = (Furniture) p;
	    jBidL1.setText("Materiale:");
	    jBidL1Text.setText(pFurniture.getMateriale());
	    jBidL2.setText("Dimensioner:");
	    jBidL2Text.setText(pFurniture.getDimension());
	} else if (p instanceof Jewelry) {
	    pJewelry = (Jewelry) p;
	    jBidL1.setText("Metal:");
	    jBidL1Text.setText(pJewelry.getMetal());
	    jBidL5.setText("Sten:");
	    jBidL5Text.setText(pJewelry.getGem());
	    jBidL2.setText("Stempel:");
	    jBidL2Text.setText(pJewelry.getStamp());
	} else if (p instanceof Wine) {
	    pWine = (Wine) p;
	    jBidL1.setText("Producent:");
	    jBidL1Text.setText(pWine.getManufacture());
	    jBidL2.setText("Årgang:");
	    jBidL2Text.setText(pWine.getYear() + "");
	    jBidL3.setText("Procent:");
	    jBidL3Text.setText(pWine.getPercentage() + "");
	    jBidL4.setText("Drue:");
	    jBidL4Text.setText(pWine.getGrapes());
	    jBidL5.setText("Land:");
	    jBidL5Text.setText(pWine.getCountry());
	    jBidL6.setText("Størrelse:");
	    jBidL6Text.setText(pWine.getBottleSize());
	    jBidL7.setText("Mængde:");
	    jBidL7Text.setText(pWine.getAmount() + "");
	}
	ArrayList<Bid> bids = load.getBidList(a);
	switch (bids.size()) {
	    case 0:
		jBidAmount.setText(a.getStartingbid() + "");
		break;
	    case 2:
		jBidBidListName2.setText(bids.get(1).getUser().getName());
		jBidBidListAmount2.setText(bids.get(1).getAmount() + " kr.");
	    case 1:
		jBidAmount.setText(bids.get(0).getValidBid() + "");
		jBidBidListName1.setText(bids.get(0).getUser().getName());
		jBidBidListAmount1.setText(bids.get(0).getAmount() + " kr.");
		break;
	    default:
		jBidAmount.setText(bids.get(0).getValidBid() + "");
		jBidBidListName1.setText(bids.get(0).getUser().getName());
		jBidBidListAmount1.setText(bids.get(0).getAmount() + " kr.");
		jBidBidListName2.setText(bids.get(1).getUser().getName());
		jBidBidListAmount2.setText(bids.get(1).getAmount() + " kr.");
		jBidBidListName3.setText(bids.get(2).getUser().getName());
		jBidBidListAmount3.setText(bids.get(2).getAmount() + " kr.");
		break;
	}
    }

    private void clearBiddingSite() {
	jBidL1.setText("");
	jBidL2.setText("");
	jBidL3.setText("");
	jBidL4.setText("");
	jBidL5.setText("");
	jBidL6.setText("");
	jBidL7.setText("");
	jBidL8.setText("");
	jBidL1Text.setText("");
	jBidL2Text.setText("");
	jBidL3Text.setText("");
	jBidL4Text.setText("");
	jBidL5Text.setText("");
	jBidL6Text.setText("");
	jBidL7Text.setText("");
	jBidL8Text.setText("");
	jBidBidListAmount1.setText("---");
	jBidBidListAmount2.setText("---");
	jBidBidListAmount3.setText("---");
	jBidBidListName1.setText("---");
	jBidBidListName2.setText("---");
	jBidBidListName3.setText("---");
    }

    private void removeAllSearchResults() {
	jSearchTabPanelAll.removeAll();
	jSearchTabPanelFurniture.removeAll();
	jSearchTabPanelJewelry.removeAll();
	jSearchTabPanelPainting.removeAll();
	jSearchTabPanelWine.removeAll();
    }

    private void setSearchTitles(int cAll, int cPainting, int cFurniture, int cJewelry, int cWine) {
	jSearchTabPane.setTitleAt(0, "Alle(" + cAll + ")");
	jSearchTabPane.setTitleAt(1, "Malerier(" + cPainting + ")");
	jSearchTabPane.setTitleAt(2, "Møbler(" + cFurniture + ")");
	jSearchTabPane.setTitleAt(3, "Smykker(" + cJewelry + ")");
	jSearchTabPane.setTitleAt(4, "Vin(" + cWine + ")");
    }

    private void revalidateSearchResults() {
	jSearchTabPanelAll.revalidate();
	jSearchTabPanelFurniture.revalidate();
	jSearchTabPanelJewelry.revalidate();
	jSearchTabPanelPainting.revalidate();
	jSearchTabPanelWine.revalidate();
    }

    private void filler(int cAll, int cPainting, int cFurniture, int cJewelry, int cWine) {
	for (int i = 0; i < (perSite - cAll); i++) {
	    SearchResult fill = new SearchResult("");
	    jSearchTabPanelAll.add(fill);
	}
	for (int i = 0; i < (perSite - cPainting); i++) {
	    SearchResult fill = new SearchResult("");
	    jSearchTabPanelPainting.add(fill);
	}
	for (int i = 0; i < (perSite - cFurniture); i++) {
	    SearchResult fill = new SearchResult("");
	    jSearchTabPanelFurniture.add(fill);
	}
	for (int i = 0; i < (perSite - cJewelry); i++) {
	    SearchResult fill = new SearchResult("");
	    jSearchTabPanelJewelry.add(fill);
	}
	for (int i = 0; i < (perSite - cWine); i++) {
	    SearchResult fill = new SearchResult("");
	    jSearchTabPanelWine.add(fill);
	}
    }

    private void updatePagenum(double cAll, double cPainting, double cFurniture, double cJewelry, double cWine) {
	switch (jSearchTabPane.getSelectedIndex()) {
	    case 0:
		total = Math.ceil(cAll / perSite);
		break;
	    case 1:
		total = Math.ceil(cPainting / perSite);
		break;
	    case 2:
		total = Math.ceil(cFurniture / perSite);
		break;
	    case 3:
		total = Math.ceil(cJewelry / perSite);
		break;
	    case 4:
		total = Math.ceil(cWine / perSite);
		break;

	}
	jSearchNumLabel.setText(page + "/" + (int) total);
    }

    private void updatePageEnd(double cAll, double cPainting, double cFurniture, double cJewelry, double cWine) {
	switch (jSearchTabPane.getSelectedIndex()) {
	    case 0:
		page = (int) Math.ceil(cAll / perSite);
		break;
	    case 1:
		page = (int) Math.ceil(cPainting / perSite);
		break;
	    case 2:
		page = (int) Math.ceil(cFurniture / perSite);
		break;
	    case 3:
		page = (int) Math.ceil(cJewelry / perSite);
		break;
	    case 4:
		page = (int) Math.ceil(cWine / perSite);
		break;

	}
	jSearchNumLabel.setText(page + "/" + page);
    }

    private void refreshAll() {
	if(null!=curAuction&&jBid.isVisible()){
	    showBid(curAuction);
	}
	if(jSearch.isVisible()){
	    rebuildSearchResult(jSearchBar.getText());
	}
	final Timer timer1= new Timer();
	TimerTask task;
	task = new TimerTask() {
	    @Override
	    public void run() {
		refreshAll();
	    }
	};
	timer1.schedule(task, 5000);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jBanner = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jSearch = new javax.swing.JPanel();
        jSearchBtnLast = new javax.swing.JButton();
        jSearchBtnNext = new javax.swing.JButton();
        jSearchNumLabel = new javax.swing.JLabel();
        jSearchBtnPrev = new javax.swing.JButton();
        jSearchBtnFirst = new javax.swing.JButton();
        jSearchTabPane = new javax.swing.JTabbedPane();
        jSearchTabPanelAll = new javax.swing.JPanel();
        jSearchTabPanelPainting = new javax.swing.JPanel();
        jSearchTabPanelFurniture = new javax.swing.JPanel();
        jSearchTabPanelJewelry = new javax.swing.JPanel();
        jSearchTabPanelWine = new javax.swing.JPanel();
        jSearchBar = new javax.swing.JTextField();
        jTest = new javax.swing.JButton();
        jSearchLabel = new javax.swing.JLabel();
        jBid = new javax.swing.JPanel();
        jBidcTitle = new javax.swing.JLabel();
        jBidBtnBack = new javax.swing.JButton();
        jBidValue = new javax.swing.JLabel();
        jBidcValue = new javax.swing.JLabel();
        jBidDiscription = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jBidcDiscription = new javax.swing.JTextArea();
        jBidL1 = new javax.swing.JLabel();
        jBidL1Text = new javax.swing.JLabel();
        jBidL2 = new javax.swing.JLabel();
        jBidL2Text = new javax.swing.JLabel();
        jBidL3 = new javax.swing.JLabel();
        jBidL3Text = new javax.swing.JLabel();
        jBidL4 = new javax.swing.JLabel();
        jBidL4Text = new javax.swing.JLabel();
        jBidL5 = new javax.swing.JLabel();
        jBidL5Text = new javax.swing.JLabel();
        jBidL6 = new javax.swing.JLabel();
        jBidL6Text = new javax.swing.JLabel();
        jBidL7 = new javax.swing.JLabel();
        jBidL7Text = new javax.swing.JLabel();
        jBidL8 = new javax.swing.JLabel();
        jBidL8Text = new javax.swing.JLabel();
        jBidAmount = new javax.swing.JTextField();
        jBidBtnBid = new javax.swing.JButton();
        jBidError = new javax.swing.JLabel();
        jBidSenesteBudLabel = new javax.swing.JLabel();
        jBidBidListName1 = new javax.swing.JLabel();
        jBidBidListAmount1 = new javax.swing.JLabel();
        jBidBidListAmount2 = new javax.swing.JLabel();
        jBidBidListName2 = new javax.swing.JLabel();
        jBidBidListAmount3 = new javax.swing.JLabel();
        jBidBidListName3 = new javax.swing.JLabel();
        jUserLogin = new javax.swing.JPanel();
        jUserLoginNameLabel = new javax.swing.JLabel();
        jUserLoginPassLabel = new javax.swing.JLabel();
        jUserLoginNameText = new javax.swing.JTextField();
        jUserLoginPassText = new javax.swing.JTextField();
        jUserLoginBtn = new javax.swing.JButton();
        jUserLoginError = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().setLayout(null);

        jBanner.setBackground(new java.awt.Color(126, 81, 39));

        jLabel2.setFont(new java.awt.Font("Verdana", 1, 30)); // NOI18N
        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel2.setText("Næstved Auktionshus");
        jLabel2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

        javax.swing.GroupLayout jBannerLayout = new javax.swing.GroupLayout(jBanner);
        jBanner.setLayout(jBannerLayout);
        jBannerLayout.setHorizontalGroup(
            jBannerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jBannerLayout.setVerticalGroup(
            jBannerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 124, Short.MAX_VALUE)
        );

        getContentPane().add(jBanner);
        jBanner.setBounds(0, 0, 400, 124);

        jSearch.setLayout(null);

        jSearchBtnLast.setText(">>");
        jSearchBtnLast.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jSearchBtnLastActionPerformed(evt);
            }
        });
        jSearch.add(jSearchBtnLast);
        jSearchBtnLast.setBounds(329, 310, 51, 23);

        jSearchBtnNext.setText(">");
        jSearchBtnNext.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jSearchBtnNextActionPerformed(evt);
            }
        });
        jSearch.add(jSearchBtnNext);
        jSearchBtnNext.setBounds(280, 310, 43, 23);

        jSearchNumLabel.setText("2/17");
        jSearch.add(jSearchNumLabel);
        jSearchNumLabel.setBounds(248, 314, 22, 14);

        jSearchBtnPrev.setText("<");
        jSearchBtnPrev.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jSearchBtnPrevActionPerformed(evt);
            }
        });
        jSearch.add(jSearchBtnPrev);
        jSearchBtnPrev.setBounds(195, 310, 43, 23);

        jSearchBtnFirst.setText("<<");
        jSearchBtnFirst.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jSearchBtnFirstActionPerformed(evt);
            }
        });
        jSearch.add(jSearchBtnFirst);
        jSearchBtnFirst.setBounds(138, 310, 51, 23);

        jSearchTabPane.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jSearchTabPaneStateChanged(evt);
            }
        });

        jSearchTabPanelAll.setLayout(new java.awt.GridLayout(5, 0));
        jSearchTabPane.addTab("Alle", jSearchTabPanelAll);

        jSearchTabPanelPainting.setLayout(new java.awt.GridLayout(5, 0));
        jSearchTabPane.addTab("Malerier", jSearchTabPanelPainting);

        jSearchTabPanelFurniture.setLayout(new java.awt.GridLayout(5, 0));
        jSearchTabPane.addTab("Møbler", jSearchTabPanelFurniture);

        jSearchTabPanelJewelry.setLayout(new java.awt.GridLayout(5, 0));
        jSearchTabPane.addTab("Smykker", jSearchTabPanelJewelry);

        jSearchTabPanelWine.setLayout(new java.awt.GridLayout(5, 0));
        jSearchTabPane.addTab("Vin", jSearchTabPanelWine);

        jSearch.add(jSearchTabPane);
        jSearchTabPane.setBounds(0, 42, 380, 262);

        jSearchBar.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jSearchBarKeyReleased(evt);
            }
        });
        jSearch.add(jSearchBar);
        jSearchBar.setBounds(69, 0, 311, 31);

        jTest.setText("TEST");
        jTest.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTestActionPerformed(evt);
            }
        });
        jSearch.add(jTest);
        jTest.setBounds(53, 310, 59, 23);

        jSearchLabel.setFont(new java.awt.Font("Verdana", 0, 14)); // NOI18N
        jSearchLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jSearchLabel.setText("SØG:");
        jSearch.add(jSearchLabel);
        jSearchLabel.setBounds(0, 0, 65, 31);

        getContentPane().add(jSearch);
        jSearch.setBounds(10, 134, 380, 333);

        jBidcTitle.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N
        jBidcTitle.setText("Title");

        jBidBtnBack.setText("< Søg");
        jBidBtnBack.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBidBtnBackActionPerformed(evt);
            }
        });

        jBidValue.setText("Værdi:");

        jBidDiscription.setText("Beskrivelse:");

        jBidcDiscription.setColumns(20);
        jBidcDiscription.setRows(5);
        jScrollPane1.setViewportView(jBidcDiscription);

        jBidL1.setText("          ");

        jBidL1Text.setText("          ");

        jBidL2.setText("          ");

        jBidL2Text.setText("          ");

        jBidL3.setText("          ");

        jBidL3Text.setText("          ");

        jBidL4.setText("          ");

        jBidL4Text.setText("          ");

        jBidL5.setText("          ");

        jBidL5Text.setText("          ");

        jBidL6.setText("          ");

        jBidL6Text.setText("          ");

        jBidL7.setText("          ");

        jBidL7Text.setText("          ");

        jBidL8.setText("          ");

        jBidL8Text.setText("          ");

        jBidAmount.setFont(new java.awt.Font("Verdana", 1, 19)); // NOI18N
        jBidAmount.setText("0000000000");
        jBidAmount.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jBidAmountKeyReleased(evt);
            }
        });

        jBidBtnBid.setText("Byd");
        jBidBtnBid.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBidBtnBidActionPerformed(evt);
            }
        });

        jBidError.setFont(new java.awt.Font("Verdana", 0, 9)); // NOI18N

        jBidSenesteBudLabel.setText("Seneste bud:");

        jBidBidListName1.setText("---");

        jBidBidListAmount1.setText("---");

        jBidBidListAmount2.setText("---");

        jBidBidListName2.setText("---");

        jBidBidListAmount3.setText("---");

        jBidBidListName3.setText("---");

        javax.swing.GroupLayout jBidLayout = new javax.swing.GroupLayout(jBid);
        jBid.setLayout(jBidLayout);
        jBidLayout.setHorizontalGroup(
            jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jBidcTitle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jBidLayout.createSequentialGroup()
                .addComponent(jBidDiscription)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
            .addGroup(jBidLayout.createSequentialGroup()
                .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jBidL1)
                    .addComponent(jBidValue, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jBidLayout.createSequentialGroup()
                        .addComponent(jBidL1Text)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jBidLayout.createSequentialGroup()
                                .addComponent(jBidL5)
                                .addGap(29, 29, 29)
                                .addComponent(jBidL5Text))
                            .addGroup(jBidLayout.createSequentialGroup()
                                .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jBidL7)
                                    .addComponent(jBidL8))
                                .addGap(31, 31, 31)
                                .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jBidL8Text)
                                    .addComponent(jBidL7Text)))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jBidLayout.createSequentialGroup()
                                .addComponent(jBidL6)
                                .addGap(31, 31, 31)
                                .addComponent(jBidL6Text)))
                        .addGap(89, 89, 89))
                    .addGroup(jBidLayout.createSequentialGroup()
                        .addComponent(jBidcValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jBidLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jBidL2)
                .addGap(31, 31, 31)
                .addComponent(jBidL2Text)
                .addGap(289, 289, 289))
            .addGroup(jBidLayout.createSequentialGroup()
                .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(jBidLayout.createSequentialGroup()
                        .addComponent(jBidAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jBidBtnBid, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jBidLayout.createSequentialGroup()
                            .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jBidL3)
                                .addComponent(jBidL4))
                            .addGap(31, 31, 31)
                            .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jBidL4Text)
                                .addComponent(jBidL3Text)))
                        .addGroup(jBidLayout.createSequentialGroup()
                            .addComponent(jBidBtnBack)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jBidError, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jBidLayout.createSequentialGroup()
                        .addComponent(jBidSenesteBudLabel)
                        .addContainerGap())
                    .addGroup(jBidLayout.createSequentialGroup()
                        .addComponent(jBidBidListName1, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jBidBidListAmount1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jBidLayout.createSequentialGroup()
                        .addComponent(jBidBidListName2, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jBidBidListAmount2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jBidLayout.createSequentialGroup()
                        .addComponent(jBidBidListName3, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jBidBidListAmount3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
        );
        jBidLayout.setVerticalGroup(
            jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jBidLayout.createSequentialGroup()
                .addComponent(jBidcTitle)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jBidDiscription)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(9, 9, 9)
                .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jBidValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jBidcValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jBidLayout.createSequentialGroup()
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jBidL1)
                            .addComponent(jBidL1Text))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jBidL2)
                            .addComponent(jBidL2Text))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jBidL3)
                            .addComponent(jBidL3Text))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jBidL4)
                            .addComponent(jBidL4Text)))
                    .addGroup(jBidLayout.createSequentialGroup()
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jBidL5)
                            .addComponent(jBidL5Text))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jBidL6)
                            .addComponent(jBidL6Text))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jBidL7)
                            .addComponent(jBidL7Text))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jBidL8)
                            .addComponent(jBidL8Text))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
                .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jBidLayout.createSequentialGroup()
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jBidBtnBid, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jBidAmount, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 46, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jBidBtnBack)
                            .addGroup(jBidLayout.createSequentialGroup()
                                .addComponent(jBidError, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addContainerGap())))
                    .addGroup(jBidLayout.createSequentialGroup()
                        .addComponent(jBidSenesteBudLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jBidBidListName1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jBidBidListAmount1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jBidBidListName2, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jBidBidListAmount2))
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jBidLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jBidBidListName3, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jBidBidListAmount3)))))
        );

        getContentPane().add(jBid);
        jBid.setBounds(10, 130, 380, 337);

        jUserLoginNameLabel.setText("Brugernavn:");

        jUserLoginPassLabel.setText("Kode:");

        jUserLoginBtn.setText("OK");
        jUserLoginBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jUserLoginBtnActionPerformed(evt);
            }
        });

        jUserLoginError.setFont(new java.awt.Font("Verdana", 1, 10)); // NOI18N
        jUserLoginError.setForeground(new java.awt.Color(225, 30, 30));

        javax.swing.GroupLayout jUserLoginLayout = new javax.swing.GroupLayout(jUserLogin);
        jUserLogin.setLayout(jUserLoginLayout);
        jUserLoginLayout.setHorizontalGroup(
            jUserLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jUserLoginLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jUserLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jUserLoginError, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jUserLoginLayout.createSequentialGroup()
                        .addGroup(jUserLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jUserLoginNameLabel)
                            .addComponent(jUserLoginPassLabel)
                            .addGroup(jUserLoginLayout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addGroup(jUserLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jUserLoginBtn)
                                    .addGroup(jUserLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jUserLoginNameText)
                                        .addComponent(jUserLoginPassText, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)))))
                        .addGap(0, 190, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jUserLoginLayout.setVerticalGroup(
            jUserLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jUserLoginLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jUserLoginNameLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jUserLoginNameText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jUserLoginPassLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jUserLoginPassText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jUserLoginBtn)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jUserLoginError, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(187, Short.MAX_VALUE))
        );

        getContentPane().add(jUserLogin);
        jUserLogin.setBounds(10, 134, 380, 333);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jBidBtnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBidBtnBackActionPerformed
	jSearch.setVisible(true);
	jBid.setVisible(false);
    }//GEN-LAST:event_jBidBtnBackActionPerformed

    private void jUserLoginBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jUserLoginBtnActionPerformed
	//products = login.getProducts();
	for (User u : load.getUsers()) {
	    if (jUserLoginNameText.getText().toLowerCase().equals(u.getName().toLowerCase()) && jUserLoginPassText.getText().equals(u.getPass())) {
		curUser = u;
		products = load.getProducts();
		jUserLogin.setVisible(false);
		jSearch.setVisible(true);
		rebuildSearchResult();
		refreshAll();
	    } else {
		jUserLoginError.setText("Brugernavn og kode matcher ikke");
	    }
	};
    }//GEN-LAST:event_jUserLoginBtnActionPerformed

    private void jTestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTestActionPerformed
	rebuildSearchResult();
    }//GEN-LAST:event_jTestActionPerformed

    private void jSearchBarKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jSearchBarKeyReleased
	refreshAll();
    }//GEN-LAST:event_jSearchBarKeyReleased

    private void jSearchBtnNextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jSearchBtnNextActionPerformed
	if (page < total) {
	    page++;
	    rebuildSearchResult(jSearchBar.getText());
	}
    }//GEN-LAST:event_jSearchBtnNextActionPerformed

    private void jSearchTabPaneStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSearchTabPaneStateChanged
	page = 1;
	updatePagenum(c, cPai, cFur, cJew, cWin);
	//if(login.checkLogin()){
	if (startUp) {
	    rebuildSearchResult(jSearchBar.getText());
	} else {
	    startUp = true;
	}
    }//GEN-LAST:event_jSearchTabPaneStateChanged

    private void jSearchBtnLastActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jSearchBtnLastActionPerformed
	updatePageEnd(c, cPai, cFur, cJew, cWin);
	rebuildSearchResult(jSearchBar.getText());
    }//GEN-LAST:event_jSearchBtnLastActionPerformed

    private void jSearchBtnFirstActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jSearchBtnFirstActionPerformed
	page = 1;
	updatePagenum(c, cPai, cFur, cJew, cWin);
	rebuildSearchResult(jSearchBar.getText());
    }//GEN-LAST:event_jSearchBtnFirstActionPerformed

    private void jSearchBtnPrevActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jSearchBtnPrevActionPerformed
	if (page > 1) {
	    page--;
	    rebuildSearchResult(jSearchBar.getText());
	}
    }//GEN-LAST:event_jSearchBtnPrevActionPerformed

    private void jBidAmountKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jBidAmountKeyReleased
	ArrayList<Bid> bids2 = load.getBidList(curAuction);
	if (isInt(jBidAmount.getText())) {
	    int nextBid = Integer.parseInt(jBidAmount.getText());
	    checkBid = bids2.get(0).calcBid(nextBid);
	    jBidError.setForeground((Color) checkBid.get(2));
	    jBidAmount.setForeground((Color) checkBid.get(2));
	    jBidError.setText((String) checkBid.get(1));
	} else {//Not int
	    jBidError.setForeground(col3);
	    jBidError.setText("Indtast et heltal");
	}
    }//GEN-LAST:event_jBidAmountKeyReleased

    private void jBidBtnBidActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBidBtnBidActionPerformed
	ArrayList<Bid> bids2 = load.getBidList(curAuction);
	if (isInt(jBidAmount.getText())) {
	    int nextBid = Integer.parseInt(jBidAmount.getText());
	    checkBid = bids2.get(0).calcBid(nextBid, true);
	    if ((boolean) checkBid.get(0)) {
		load.addBid(curAuction, curUser, nextBid);
		clearBiddingSite();
		showBid(curAuction);
	    }
	    jBidError.setForeground((Color) checkBid.get(2));
	    jBidError.setText((String) checkBid.get(1));
	}
    }//GEN-LAST:event_jBidBtnBidActionPerformed
    public static boolean isInt(String e) {
	try {
	    Integer.parseInt(e);
	} catch (NumberFormatException ex) {
	    return false;
	}
	return true;
    }
    
    //timer
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
	/* Set the Nimbus look and feel */
	//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
	 * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
	 */
	try {
	    for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
		if ("Nimbus".equals(info.getName())) {
		    javax.swing.UIManager.setLookAndFeel(info.getClassName());
		    break;
		}
	    }
	} catch (ClassNotFoundException ex) {
	    java.util.logging.Logger.getLogger(GUISketchTwo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
	} catch (InstantiationException ex) {
	    java.util.logging.Logger.getLogger(GUISketchTwo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
	} catch (IllegalAccessException ex) {
	    java.util.logging.Logger.getLogger(GUISketchTwo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
	} catch (javax.swing.UnsupportedLookAndFeelException ex) {
	    java.util.logging.Logger.getLogger(GUISketchTwo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
	}
	//</editor-fold>

	/* Create and display the form */
	java.awt.EventQueue.invokeLater(new Runnable() {
	    public void run() {
		new GUISketchTwo().setVisible(true);

	    }
	});
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jBanner;
    private javax.swing.JPanel jBid;
    private javax.swing.JTextField jBidAmount;
    private javax.swing.JLabel jBidBidListAmount1;
    private javax.swing.JLabel jBidBidListAmount2;
    private javax.swing.JLabel jBidBidListAmount3;
    private javax.swing.JLabel jBidBidListName1;
    private javax.swing.JLabel jBidBidListName2;
    private javax.swing.JLabel jBidBidListName3;
    private javax.swing.JButton jBidBtnBack;
    private javax.swing.JButton jBidBtnBid;
    private javax.swing.JLabel jBidDiscription;
    private javax.swing.JLabel jBidError;
    private javax.swing.JLabel jBidL1;
    private javax.swing.JLabel jBidL1Text;
    private javax.swing.JLabel jBidL2;
    private javax.swing.JLabel jBidL2Text;
    private javax.swing.JLabel jBidL3;
    private javax.swing.JLabel jBidL3Text;
    private javax.swing.JLabel jBidL4;
    private javax.swing.JLabel jBidL4Text;
    private javax.swing.JLabel jBidL5;
    private javax.swing.JLabel jBidL5Text;
    private javax.swing.JLabel jBidL6;
    private javax.swing.JLabel jBidL6Text;
    private javax.swing.JLabel jBidL7;
    private javax.swing.JLabel jBidL7Text;
    private javax.swing.JLabel jBidL8;
    private javax.swing.JLabel jBidL8Text;
    private javax.swing.JLabel jBidSenesteBudLabel;
    private javax.swing.JLabel jBidValue;
    private javax.swing.JTextArea jBidcDiscription;
    private javax.swing.JLabel jBidcTitle;
    private javax.swing.JLabel jBidcValue;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel jSearch;
    private javax.swing.JTextField jSearchBar;
    private javax.swing.JButton jSearchBtnFirst;
    private javax.swing.JButton jSearchBtnLast;
    private javax.swing.JButton jSearchBtnNext;
    private javax.swing.JButton jSearchBtnPrev;
    private javax.swing.JLabel jSearchLabel;
    private javax.swing.JLabel jSearchNumLabel;
    private javax.swing.JTabbedPane jSearchTabPane;
    private javax.swing.JPanel jSearchTabPanelAll;
    private javax.swing.JPanel jSearchTabPanelFurniture;
    private javax.swing.JPanel jSearchTabPanelJewelry;
    private javax.swing.JPanel jSearchTabPanelPainting;
    private javax.swing.JPanel jSearchTabPanelWine;
    private javax.swing.JButton jTest;
    private javax.swing.JPanel jUserLogin;
    private javax.swing.JButton jUserLoginBtn;
    private javax.swing.JLabel jUserLoginError;
    private javax.swing.JLabel jUserLoginNameLabel;
    private javax.swing.JTextField jUserLoginNameText;
    private javax.swing.JLabel jUserLoginPassLabel;
    private javax.swing.JTextField jUserLoginPassText;
    // End of variables declaration//GEN-END:variables

}
